#include <iostream>

int const mo = 1e6 + 3;
int const maxn = 1002;
int const max_len = 63;
int da[maxn];
int bit_one[max_len];
long long combine[maxn][maxn];
int n;

void init()
{
	for (int i = 0; i < maxn; i++) {
		combine[i][0] = combine[i][i] = 1;
		combine[i][1] = i;
	}
	for (int i = 1; i < maxn; i++)
		for (int j = 1; j < i; j++)
			combine[i][j] = (combine[i-1][j-1] + combine[i-1][j]) % mo;
}

long long calc(int x, int y)
{
	return combine[x][y] % mo;
}

int main()
{
	init();
	while (std::cin >> n) {
		for (int i = 0; i < max_len; i++) bit_one[i] = 0;
		for (int i = 0; i < n; i++) {
			std::cin >> da[i];
			for (int j = da[i], t = 0; j; j /= 2, t++)
				if (j&1) bit_one[t]++;
		}

		for (int k = 1; k <= n; k++ ) {
			long long ans = 0;
			for (int bit = 0; bit < max_len; bit++) {
				int max_one = std::min(k, bit_one[bit]);
				for (int i = 1; i <= max_one; i += 2) {
					if (n - bit_one[bit] < k - i) continue;
					long long tmp = (calc(bit_one[bit], i) * calc(n - bit_one[bit], k - i)) % mo;
					ans = (ans + ((tmp * ((1<<bit) % mo)) % mo)) % mo;
				}
			}
			if (k == 1) std::cout << ans;
			else        std::cout << ' ' << ans;
		}
		std::cout << '\n';
	}
}

